﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace SpaceInvaders
{
    abstract class BaseScene
    {
        protected int xOffset, yOffset;
        protected double xScale, yScale;
        protected List<DrawObject> DrawList = new List<DrawObject> { };
        Graphics graphics;

        public BaseScene(int xO, int yO, double xS, double yS, Graphics g)
        {
            graphics = g;
            xOffset = xO;
            yOffset = yO;
            xScale = xS;
            yScale = yS;
        }

        public void AddDrawObject(DrawObject drawObj)
        {
            drawObj.setSceneParams(xOffset, yOffset, xScale, yScale);
            DrawList.Add(drawObj);            
        }

        public virtual void Redraw()
        {
            foreach (var d in DrawList)
            {
                d.Draw(graphics);
            }
            return;
        }
    }
}
